/* $Id: UserDomainObjectManager.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */
package ae.pcfc.etks.online.common.domain.manager;

import java.util.List;

import ae.pcfc.etks.online.common.domain.User;
import ae.pcfc.etks.online.common.vo.PagingVO;

public interface UserDomainObjectManager extends BaseDomainObjectManager {
	
	/**
	 * findUserByUserName
	 * Method to find user by username
	 * @param userName
	 * @return
	 * User
	 */
	public User findUserByUserName(String userName);
	
	/**
	 * getUserList
	 * Method to get all the users
	 * @return
	 * List<User>
	 */
	public List<User> getUserList();
	
	/**
	 * getUserListByPagingParameters
	 * Method to get the list of users page based on the paging information
	 * @param pagingVO
	 * @return
	 * List<User>
	 */
	public List<User> getUserListByPagingParameters(PagingVO pagingVO);
	
	/**
	 * findUserByEmail
	 * Method to find the user by email
	 * @param email
	 * @return
	 * User
	 */
	public User findUserByEmail(String email);
	
	/**
	 * add
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.BaseDomainObjectManager#add(java.lang.Object)
	 * 
	 */
	public <T> void add(T obj);
	
	/**
	 * findUserByEmailExceptCurrentUser
	 * Method to find to which user the email is associated with except the specified user id
	 * @param strEmail
	 * @param lUserId
	 * @return
	 * User
	 */
	public User findUserByEmailExceptCurrentUser(String strEmail,
			Long lUserId);
	/**
	 * findUserByEmailExceptCurrentCompany
	 * Method to find to which user the email address is associated except the specified client (trakhees id)
	 * @param strEmail
	 * @param strTrakheesId
	 * @return
	 * User
	 */
	public User findUserByEmailExceptCurrentCompany(String strEmail,
			String strTrakheesId);
	/**
	 * findUsersByTrakheesId
	 * Method to find the list of users registered under a client (trakhees id)
	 * @param strTrakheesId
	 * @return
	 * List<User>
	 */
	public List<User> findUsersByTrakheesId(String strTrakheesId);

	/**
	 * findClientAdminByTrakheesId
	 * Method to find the Client Admin of a Client by using its Trakhees Id
	 * @param strTrakheesId
	 * @return
	 * User
	 */
	public User findClientAdminByTrakheesId(String strTrakheesId);
	
}
